package edu.cuc.spring.config.server;

import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component("timeServerIni")
public class TimeServerIni extends ChannelInitializer{
    @Resource(name = "timeHandler")
    private TimeServerHandler timeServerHandler;
    @Override
    protected void initChannel(Channel ch) throws Exception {
        ch.pipeline().addLast(timeServerHandler);
    }
}
